﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace CommunitySystem.Elements
{
    public partial class GridSplitToUD : UserControl
    {
        public event EventHandler ToUp;
        public event EventHandler ToDown;

        public GridSplitToUD()
        {
            InitializeComponent();
        }

        private void Border_MouseEnter(object sender, MouseEventArgs e)
        {
            toUp.Fill = new SolidColorBrush(Colors.Black);
        }

        private void Border_MouseLeave(object sender, MouseEventArgs e)
        {
            toUp.Fill = new SolidColorBrush(Colors.White);
        }

        private void Down_MouseEnter(object sender, MouseEventArgs e)
        {
            toDown.Fill = new SolidColorBrush(Colors.Black);
        }

        private void Down_MouseLeave(object sender, MouseEventArgs e)
        {
            toDown.Fill = new SolidColorBrush(Colors.White);
        }

        private void toUp_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (ToUp != null)
            {
                ToUp(this, EventArgs.Empty);
            }
        }

        private void toDown_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            if (ToDown != null)
            {
                ToDown(this, EventArgs.Empty);
            }
        }
    }
}
